/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesOrderLinefp extends BasicModel<MesOrderLinefp> {
  modid?: string; // 订单子表ID
  invCode?: string; // 存货编码
  lineCode?: string; // 生产线
  iqty?: number; // 数量
  createByName?: string; // 创建人名称
  updateByName?: string; // 修改人名称
}

export const mesOrderLinefpList = (params?: MesOrderLinefp | any) =>
  defHttp.get<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/list', params });

export const mesOrderLinefpListData = (params?: MesOrderLinefp | any) =>
  defHttp.post<Page<MesOrderLinefp>>({ url: adminPath + '/mo/line/mesOrderLinefp/listData', params });

export const mesOrderLinefpForm = (params?: MesOrderLinefp | any) =>
  defHttp.get<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/form', params });

export const mesOrderLinefpSave = (params?: any, data?: MesOrderLinefp | any) =>
  defHttp.postJson<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/save', params, data });

export const mesOrderLinefpDelete = (params?: MesOrderLinefp | any) =>
  defHttp.get<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/delete', params });

export const mesOrderLinefpLineFp = (params?: any, data?: MesOrderLinefp | any) =>
  defHttp.postJson<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/lineFp', params, data });

export const mesOrderLinefpLineFp2 = (params?: any, data?: MesOrderLinefp | any) =>
  defHttp.postJson<MesOrderLinefp>({ url: adminPath + '/mo/line/mesOrderLinefp/lineFp2', params, data });

export const mesLineListData = (params?: MesOrderLinefp | any) =>
  defHttp.post<Page<MesOrderLinefp>>({ url: adminPath + '/mo/line/listData', params });

export const mesLineOpenLine = (params?: MesOrderLinefp | any) =>
  defHttp.post<Page<MesOrderLinefp>>({ url: adminPath + '/mo/line/openLine', params });

export const mesLineCloseLine = (params?: MesOrderLinefp | any) =>
  defHttp.post<Page<MesOrderLinefp>>({ url: adminPath + '/mo/line/closeLine', params });

export const mesOrderLinefpTreeData = (params?: any) =>
  defHttp.get<BasicModel[]>({ url: adminPath + '/mo/line/mesOrderLinefp/treeData', params });
